package tt.dz.egobus.servicemanager.business.distance;

import tt.dz.egobus.servicemanager.bean.DefaultSPIServiceLoader;
import tt.dz.egobus.servicemanager.bean.SPIAbstractIdAlgorithmFactory;
import tt.dz.egobus.servicemanager.bean.SPIServiceLoader;
import tt.dz.egobus.servicemanager.core.factory.IdFactory;

/**
 * @param
 * @author Anson
 * @date 17-3-30
 * @name 最大距离的SFI工厂
 * @since 1.0.3
 */
public class SPIMaxOverAlgorithmFactory extends SPIAbstractIdAlgorithmFactory<MaxOverAlgorithm>
        implements IdFactory<MaxOverAlgorithm> {

    private final SPIServiceLoader loader = new DefaultSPIServiceLoader();

    public SPIMaxOverAlgorithmFactory() {
    }

    /**
     * @param id 逻辑算法id
     * @author Anson
     * @date 17-3-27
     * @name 当前实现类必须还有默认的构造器
     * @since 1.0.3
     */
    @Override
    public MaxOverAlgorithm factory(String id) {
        return this.get(id);
    }

    @Override
    protected SPIServiceLoader getSFIServiceLoader() {
        return this.loader;
    }

    @Override
    protected Class<MaxOverAlgorithm> getCurInterfaceClass() {
        return MaxOverAlgorithm.class;
    }
}
